17 research outputs found

    A General Framework for Static Profiling of Parametric Resource Usage

    Get PDF
    Traditional static resource analyses estimate the total resource usage of a program, without executing it. In this paper we present a novel resource analysis whose aim is instead the static profiling of accumulated cost, i.e., to discover, for selected parts of the program, an estimate or bound of the resource usage accumulated in each of those parts. Traditional resource analyses are parametric in the sense that the results can be functions on input data sizes. Our static profiling is also parametric, i.e., our accumulated cost estimates are also parameterized by input data sizes. Our proposal is based on the concept of cost centers and a program transformation that allows the static inference of functions that return bounds on these accumulated costs depending on input data sizes, for each cost center of interest. Such information is much more useful to the software developer than the traditional resource usage functions, as it allows identifying the parts of a program that should be optimized, because of their greater impact on the total cost of program executions. We also report on our implementation of the proposed technique using the CiaoPP program analysis framework, and provide some experimental results. This paper is under consideration for acceptance in TPLP.Comment: Paper presented at the 32nd International Conference on Logic Programming (ICLP 2016), New York City, USA, 16-21 October 2016, 22 pages, LaTe

    Trading-off accuracy vs energy in multicore processors via evolutionary algorithms combining loop perforation and static analysis-based scheduling

    Get PDF
    This work addresses the problem of energy efficient scheduling and allocation of tasks in multicore environments, where the tasks can permit certain loss in accuracy of either final or intermediate results, while still providing proper functionality. Loss in accuracy is usually obtained with techniques that decrease computational load, which can result in significant energy savings. To this end, in this work we use the loop perforation technique that transforms loops to execute a subset of their iterations, and integrate it in our existing optimisation tool for energy efficient scheduling in multicore environments based on evolutionary algorithms and static analysis for estimating energy consumption of different schedules. The approach is designed for multicore XMOS chips, but it can be adapted to any multicore environment with slight changes. The experiments conducted on a case study in different scenarios show that our new scheduler enhanced with loop perforation improves the previous one, achieving significant energy savings (31 % on average) for acceptable levels of accuracy loss

    Towards Energy Consumption Verification via Static Analysis

    Full text link
    In this paper we leverage an existing general framework for resource usage verification and specialize it for verifying energy consumption specifications of embedded programs. Such specifications can include both lower and upper bounds on energy usage, and they can express intervals within which energy usage is to be certified to be within such bounds. The bounds of the intervals can be given in general as functions on input data sizes. Our verification system can prove whether such energy usage specifications are met or not. It can also infer the particular conditions under which the specifications hold. To this end, these conditions are also expressed as intervals of functions of input data sizes, such that a given specification can be proved for some intervals but disproved for others. The specifications themselves can also include preconditions expressing intervals for input data sizes. We report on a prototype implementation of our approach within the CiaoPP system for the XC language and XS1-L architecture, and illustrate with an example how embedded software developers can use this tool, and in particular for determining values for program parameters that ensure meeting a given energy budget while minimizing the loss in quality of service.Comment: Presented at HIP3ES, 2015 (arXiv: 1501.03064

    A Transformational Approach to Parametric Accumulated-Cost Static Profiling

    Get PDF
    Traditional static resource analyses estimate the total resource usage of a program, without executing it. In this paper we present a novel resource analysis whose aim is instead the static profiling of accumulated cost, i.e., to discover, for selected parts of the program, an estimate or bound of the resource usage accumulated in each of those parts. Traditional resource analyses are parametric in the sense that the results can be functions on input data sizes. Our static profiling is also parametric, i.e., our accumulated cost estimates are also parameterized by input data sizes. Our proposal is based on the concept of cost centers and a program transformation that allows the static inference of functions that return bounds on these accumulated costs depending on input data sizes, for each cost center of interest. Such information is much more useful to the software developer than the traditional resource usage functions, as it allows identifying the parts of a program that should be optimized, because of their greater impact on the total cost of program executions. We also report on our implementation of the proposed technique using the CiaoPP program analysis framework, and provide some experimental results

    Interval-based Resource Usage Verification by Translation into Horn Clauses and an Application to Energy Consumption

    Full text link
    Many applications require conformance with specifications that constrain the use of resources, such as execution time, energy, bandwidth, etc. We have presented a configurable framework for static resource usage verification where specifications can include lower and upper bound, data size-dependent resource usage functions. To statically check such specifications, our framework infers the same type of resource usage functions, which safely approximate the actual resource usage of the program, and compares them against the specification. We review how this framework supports several languages and compilation output formats by translating them to an intermediate representation based on Horn clauses and using the configurability of the framework to describe the resource semantics of the input language. We provide a more detailed formalization and extend the framework so that both resource usage specification and analysis/verification output can include preconditions expressing intervals for the input data sizes for which assertions are applicable, proved, or disproved. Most importantly, we also extend the classes of functions that can be checked. We provide results from an implementation within the Ciao/CiaoPP framework, and report on a tool built by instantiating this framework for the verification of energy consumption specifications for imperative/embedded programs. This paper is under consideration for publication in Theory and Practice of Logic Programming (TPLP).Comment: Under consideration for publication in Theory and Practice of Logic Programming (TPLP

    An evolutionary scheduling approach for trading-off accuracy vs. verifiable energy in multicore processors

    Get PDF
    This work addresses the problem of energy-efficient scheduling and allocation of tasks in multicore environments, where the tasks can allow a certain loss in accuracy in the output, while still providing proper functionality and meeting an energy budget. This margin for accuracy loss is exploited by using computing techniques that reduce the work load, and thus can also result in significant energy savings. To this end, we use the technique of loop perforation, that transforms loops to execute only a subset of their original iterations, and integrate this technique into our existing optimization tool for energy-efficient scheduling. To verify that a schedule meets an energy budget, both safe upper and lower bounds on the energy consumption of the tasks involved are needed. For this reason, we use a parametric approach to estimate safe (and tight) energy bounds that are practical for energy verification (and optimization applications). This approach consists in dividing a program into basic (?branchless?) blocks, establishing the maximal (resp. minimal) energy consumption for each block using an evolutionary algorithm, and combining the obtained values according to the program control flow, by using static analysis to produce energy bound functions on input data sizes. The scheduling tool uses evolutionary algorithms coupled with the energy bound functions for estimating the energy consumption of different schedules. The experiments with our prototype implementation were performed on multicore XMOS chips, but our approach can be adapted to any multicore environment with minor changes. The experimental results show that our new scheduler enhanced with loop perforation improves on the previous one, achieving significant energy savings (31% on average for the test programs) for acceptable levels of accuracy loss

    ENTRA:Whole-systems energy transparency

    Get PDF
    Promoting energy efficiency to a first class system design goal is an important research challenge. Although more energy-efficient hardware can be designed, it is software that controls the hardware; for a given system the potential for energy savings is likely to be much greater at the higher levels of abstraction in the system stack. Thus the greatest savings are expected from energy-aware software development, which is the vision of the EU ENTRA project. This article presents the concept of energy transparency as a foundation for energy-aware software development. We show how energy modelling of hardware is combined with static analysis to allow the programmer to understand the energy consumption of a program without executing it, thus enabling exploration of the design space taking energy into consideration. The paper concludes by summarising the current and future challenges identified in the ENTRA project.Comment: Revised preprint submitted to MICPRO on 27 May 2016, 23 pages, 3 figure

    A multi-language and multi-platform framework for resource consumption analysis and its application to energy-efficient software development

    Full text link
    La reducción y el control del consumo de energía de las tecnologías de la información, así como de su impacto medioambiental, se han convertido en todo un desafío a nivel mundial. Es un problema importante en sistemas que van desde pequeños dispositivos de Internet de las Cosas, sensores, relojes y teléfonos inteligentes, dispositivos médicos portables o implantables, hasta grandes centros de cálculo y sistemas informáticos de altas prestaciones. A pesar de los rápidos avances en hardware eficiente en consumo de energía, incluyendo nuevas baterías y tecnologías de recolección de energía, es el software el que controla el hardware, por lo que se consiguen mayores ahorros de energía al desarrollar aplicaciones software que realicen una mejor gestión de las características de ahorro de energía y recursos proporcionados por el hardware. El ahorro de energía será potencialmente mucho mayor trabajando en los niveles de abstracción más altos en la pila del sistema. Por ello, existe un creciente interés en considerar la eficiencia energética como un objetivo prioritario de diseño de software, lo cual plantea importantes desafíos de investigación. Esta tesis aborda dichos desafíos, proporcionando técnicas y herramientas para el desarrollo de software consciente del consumo de energía. En primer lugar, como técnica base fundamental, la tesis se centra en la estimación de cotas inferiores y superiores de la energía consumida por las aplicaciones software. El enfoque propuesto realiza una combinación de técnicas de análisis estático de programas con técnicas de modelado de plataformas hardware. Los modelos de energía se utilizan para expresar el efecto, en términos del consumo de energía en el hardware, de la ejecución de elementos software básicos, como por ejemplo, instrucciones ensamblador o bloques de bajo nivel, y hacen que el sistema desarrollado sea paramétrico respecto a la plataforma de ejecución. El análisis estático propaga dicha información (en tiempo de compilación, sin ejecutar el programa con datos concretos, sino realizando una interpretación abstracta del mismo) a través de segmentos de código, estructuras de control condicionales, bucles, recursiones, etc., para inferir el consumo de energía de todo el programa. Dicha información se obtiene en forma de funciones que dependen de los tamaños de datos de entrada de los programas y posiblemente de otros parámetros, como la frecuencia de reloj, voltaje, etc. El marco para la estimación del consumo de recursos propuesto es muy general, multi-lenguaje y paramétrico respecto a recursos y plataformas de ejecución, y se especializa para la inferencia de funciones que calculan cotas del consumo de energía a dos niveles de abstracción, lenguaje ensamblador y código intermedio (LLVM IR), las cuales se reflejan luego a nivel de código fuente. Para ello la tesis desarrolla traducciones de estos dos niveles a una representación intermedia (cláusulas de Horn) en la que opera el análisis. Además, realiza un estudio experimental de dicho análisis, que proporciona información útil sobre el compromiso existente entre la precisión de las estimaciones frente a la analizabilidad a estos dos niveles, y concluye que el análisis a nivel LLVM IR es un buen compromiso. Para recursos que son independientes del hardware (como los pasos de ejecución), el análisis estima cotas inferiores y superiores seguras. Para que las cotas sean también seguras para recursos dependientes del hardware, como la energía, se necesita incorporar modelos de energía que proporcionen también cotas seguras. En este sentido, la tesis propone un enfoque de modelado novedoso que consiste en dividir un programa en bloques básicos (sin ramificaciones), estableciendo el consumo de energía máximo (o mínimo) para cada bloque usando un algoritmo evolutivo. Dicho modelo a nivel de bloques es utilizado por el análisis estático para inferir cotas del consumo de energía más ajustadas, que son prácticas para su apliación en verificación y optimización del consumo de energía. El enfoque ha sido evaluado con programas XC ejecutando en chips XMOS, pero es lo suficientemente general como para ser aplicado a cualquier microprocesador y lenguaje de programación. Los resultados experimentales muestran que, en la práctica, las cotas obtenidas por el prototipo desarrollado son precisas, a la vez que se mantienen en el lado seguro del consumo real de energía. Tradicionalmente, los análisis de recursos estáticos estiman el uso total de los recursos consumidos por una llamada a un programa. En esta tesis se desarrolla también un novedoso análisis de recursos cuyo objetivo es, en cambio, el perfilado estático del coste acumulado, es decir, la estimación, para partes seleccionadas del programa, denominadas centros de coste, de cotas del uso de recursos acumulados en cada uno de esos centros, que indican como se distribuye el coste total entre los mismos. Los análisis de recursos tradicionales son paramétricos, en el sentido de que los resultados pueden ser funciones que dependen de los tamaños de datos de entrada. El perfilado estático aquí propuesto también es paramétrico, y las estimaciones de coste acumulado dependen de los tamaños de datos de entrada del programa principal. El método se basa en el concepto de centros de coste y una transformación de programa que instrumenta el mismo para calcular el coste acumulado en cada uno de dichos centros. Al programa transformado se le aplica luego un análisis de tamaños y se inferen los costes acumulados en función de los tamaños de datos de entrada del programa principal. La información de coste acumulado es mucho más útil para el desarrollador de software que el coste estándar (tradicional), ya que permite identificar las partes de un programa que deben optimizarse en primer lugar, debido a su mayor impacto en el coste total de la ejecución de una llamada al mismo. La técnica propuesta también se ha implementado e integrado en el sistema CiaoPP, y se ha realizado una evaluación experimental. Finalmente, utilizando las estimaciones del consumo de energía obtenidas mediante las técnicas mencionadas se pueden realizar diferentes tipos de optimizaciones, tanto estáticas como dinámicas, en los correspondientes niveles de la pila del sistema. La tesis explora algunas de ellas, en particular, propone nuevos métodos basados en algoritmos evolutivos para mejorar la planificación y asignación de tareas a procesadores en arquitecturas multi-núcleo que ofrecen la posibilidad de modificar la frecuencia de reloj y el voltaje (DVFS). Dichos métodos son capaces de gestionar la migración y apropiación de tareas. Para las aplicaciones que permiten ciertos niveles de variabilidad en la precisión de sus resultados, la tesis también propone algoritmos que explotan el compromiso entre la precisión y el consumo de energía. ----------ABSTRACT---------- Reducing and controlling the energy consumption and the environmental impact of computing technologies have become a challenging problem worldwide. It is a significant issue in systems ranging from small Internet of Things devices, sensors, smart watches, smart phones and portable/implantable medical devices, to large data centers and high-performance computing systems. In spite of the recent rapid advances in energy-efficient hardware, including battery and energy harvesting technology, it is software that controls the hardware, so that the greatest savings are expected from developing software applications that perform a better management of the energy-saving features and resources provided by the hardware. For a given system, the potential for energy savings is likely to be much greater at the higher levels of abstraction in the system stack. Thus, promoting energy efficiency to a first class software design goal has become an important research challenge. This thesis addresses this challenge and provides tools and techniques for energy-aware software development. First, the thesis focuses on the development of techniques for the estimation of lower and upper bounds on the energy consumed by software applications, as well as the verification that such applications meet some energy budgets (given as specifications). Addressing a challenging objective, such techniques perform the estimations statically (i.e., at compile-time, without running the program with concrete data), and give such information in the form of functions on the input data sizes of programs (and possibly other parameters, such as clock frequency, voltage, etc.). The proposed approach performs a combination of techniques for static program analysis with techniques for modeling hardware platforms. The energy models are used to represent the effect, regarding energy consumption on the hardware, of running basic software elements (e.g., low-level assembly instructions or blocks). The static analysis propagates such information through code segments, conditionals, loops, recursions, etc., in order to infer the energy consumption of the whole program. One of the main contributions of the thesis is a multi-language general resource consumption analysis, and a specialization that infers both lower- and upper-bound energy functions at two levels, the instruction set architecture (ISA) and the intermediate code (LLVM IR) levels, and reflects it upwards to the higher source code level. To achieve this, we develop translations from both ISA and the LLVM IR to an intermediate representation (Horn clauses) on which the analysis operates on. Another contribution is the experimental assessment of such analysis, which provides insights into the trade-off of precision versus analyzability at these levels, and concludes that the LLVM IR level analysis is a good compromise. The analysis estimates safe lower and upper bounds on the use of resources that are independent from the hardware, such as execution steps. However, in order to infer safe bounds for hardware-dependent resources, such as energy, the analysis needs to be fed with energy models that provide safe bounds too. To this end, the thesis proposes a novel modeling approach that consists in dividing a program into basic (branchless) blocks, establishing the maximal (resp. minimal) energy consumption for each block using an evolutionary algorithm. Then, such block-level model is used by the static analysis to infer tight energy bounds that are practical for energy verification and optimization applications. The approach has been tested on XC programs running on XMOS chips, but it is general enough to be applied to any microprocessor and programming language. The experimental results show that the bounds obtained by our prototype tool can be tight while remaining on the safe side of actual energy consumption in practice. Traditional static resource analyses estimate the total resource usage of a call to a program, without executing it. The thesis presents a novel resource analysis whose aim is instead the static profiling of accumulated cost, i.e., to discover, for selected parts of the program (named cost centers), bounds on the resource usage accumulated in each of those parts, which express how the total cost of a call to the main program is distributed among the different cost centers. Traditional resource analyses are parametric in the sense that the results can be functions on input data sizes. Our static profiling is also parametric, i.e., our accumulated cost estimates are also parameterized by input data sizes of the main program. Our proposal is based on the concept of cost centers and a program transformation that instruments programs to compute accumulated costs for each cost center. A size analysis is then applied to the transformed program to infer functions that return bounds on accumulated costs depending on input data sizes of the main program. Accumulated cost information is much more useful to the software developer than the standard (traditional) resource usage functions, as it allows identifying the parts of a program that should be optimized first, because of their greater impact on the total cost of program executions. We also report on our implementation and integration of the proposed techniques in the CiaoPP system, and provide some experimental results. Finally, using the energy estimations provided by the aforementioned multi-level and multi-language energy consumption analysis, different types of optimisations, both static and dynamic, can be performed at different levels of the system stack. The thesis explores some of them and makes original contributions. In particular, the thesis proposes new methods based on evolutionary algorithms to improve energy-efficient task allocation and scheduling for DVFS-enabled multicore environments. These algorithms are able to deal with task migration and preemption. For applications that allow certain levels of variability in the accuracy of their results, the thesis also proposes algorithms to exploit the trade-off between accuracy and energy consumption

    A Practical Approach for Energy Efficient Scheduling in Multicore Environments by Combining Evolutionary and YDS Algorithms with Faster Energy Estimation

    No full text
    Part 8: Energy Management and Smart GridInternational audienceEnergy efficient scheduling and allocation in multicore environments is a well-known NP-hard problem. Nevertheless approximated solutions can be efficiently found by heuristic algorithms, such as evolutionary algorithms (EAs). However, these algorithms have some drawbacks that hinder their applicability: typically they are very slow, and if the space of the feasible solutions is too restricted, they often fail to provide a viable solution. In this paper we propose an approach that overcomes these issues. The approach is based on a custom EA that is fed with predicted information provided by an existing static analysis about the energy consumed by tasks. This solves the time inefficiency problem. In addition, when this algorithm fails to produce a feasible solution, we resort to a modification of the well-known YDS algorithm that we have performed, well adapted to the multicore environment and to the situations when the static power becomes the predominant part. This way, we propose a combined approach that produces an energy efficient scheduling in reasonable time, and always finds a viable solution. The approach has been tested on multicore XMOS chips, but it can easily be adapted to other multicore environments as well. In the tested scenarios the modified YDS can improve the original one up to 20%, while our EA can save 55 − 90% more energy on average than the modified YDS

    Energy consumption analysis and verification using CiaoPP

    Full text link
    Energy consumption and the environmental impact of computing technologies have become important concerns. There is increased demand for complex computing systems which have to operate on batteries or harvested energy, such as implantable/portable medical devices, space systems, mobile phones, and other Internet of Things devices. At the same time, energy con- sumption is also an important problem in high-performance computing and data center
    corecore